/* jshint esversion: 6 */

const mysql = require('mysql');

//Nodejs 使用MySQL 删除数据
// init db config & create mysql connection
const connection = mysql.createConnection({
    host: 'localhost',
    port: 3306,
    user: 'root',
    password: 'chendong',
    database: 'quarterReport'
});
connection.connect();


connection.query('DELETE FROM processRiskDesc WHERE publish_author = ?', ['lomo2017'], function(error, results, fields) {
    if (error)
        throw (error);
    console.log(results);
});

connection.end(function() {
    console.log('-------delete end--------');
});